package com.thon.entity.system;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.thon.entity.util.IdEntity;

/**
 * @author manpiaoyi
 * @mail manpiaoyi@126.com
 * @date 2014-10-20
 * @description
 */
@Entity
@Table(name = "authority")
@JsonIgnoreProperties(ignoreUnknown = true)
public class Authority extends IdEntity {
	
	private static final long serialVersionUID = -2882541081318874188L;
	private String authorityName;
	private SystemDicData module;	
	private SystemDicData permissions;
	private String method;
	private String authentication;
	private Integer sort;
	private String description;
	

	@ManyToOne(cascade = CascadeType.MERGE)
	@JoinColumn(name="module_id", nullable = false)
	@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
	public SystemDicData getModule() {
		return module;
	}
	public void setModule(SystemDicData module) {
		this.module = module;
	}	
	
	@ManyToOne(cascade = CascadeType.MERGE)
	@JoinColumn(name="permissions_id", nullable = false)
	@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
	public SystemDicData getpermissions() {
		return permissions;
	}
	public void setpermissions(SystemDicData permissions) {
		this.permissions = permissions;
	}
	public String getMethod() {
		return method;
	}
	public void setMethod(String method) {
		this.method = method;
	}
	public String getAuthentication() {
		return authentication;
	}
	public void setAuthentication(String authentication) {
		this.authentication = authentication;
	}
	public Integer getSort() {
		return sort;
	}
	public void setSort(Integer sort) {
		this.sort = sort;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getAuthorityName() {
		return authorityName;
	}
	public void setAuthorityName(String authorityName) {
		this.authorityName = authorityName;
	}
	
	


	
	
}
